package com.yidu.qianfeng.common.bean.waybill;

import lombok.Data;

import java.util.List;

/**
 * @Author: TangSheng
 * @Description: 运单查询条件包装类
 * @Date Created in 20:21 2021/3/22
 * @since 1.0
 */

@Data
public class WaybillCondition {

    private String waybillConsignNum;//根据托运单号查询

    private String startDate;//开始日期

    private String endDate;//结束日期

    private String waybillOrderNum;//根据订单编号查询

    private String waybillStartingSubst;//根据运单出发站Id查询

    private String waybillReachSubst;//根据运单到达站ID查询

    private String waybillReachCity;//根据到达城市查询

    private String transNum;//根据运输单号查询

    private String shipperCom;//根据发货公司查询

    private String consiCom;//根据收货公司查询

    private String consiTelephone;//根据收货电话查询

    private List<Integer> trackTypes;//根据跟踪状态查询

    private Integer page;//当前页

    private Integer count;//显示条目数

    private Integer offset;//偏移量


    public void setWaybillConsignNum(String waybillConsignNum) {
        if(waybillConsignNum != null && waybillConsignNum != ""){
            this.waybillConsignNum = "%"+waybillConsignNum+"%";
        }else {
            this.waybillConsignNum = waybillConsignNum;
        }
    }

    public void setWaybillReachCity(String waybillReachCity) {
        if(waybillReachCity != null && waybillReachCity != ""){
            this.waybillReachCity = "%"+waybillReachCity+"%";
        }else {
            this.waybillReachCity = waybillReachCity;
        }
    }

    public void setTransNum(String transNum) {
        if(transNum != null && transNum != ""){
            this.transNum = "%"+transNum+"%";
        }else {
            this.transNum = transNum;
        }
    }

    public void setShipperCom(String shipperCom) {
        if(shipperCom != null && shipperCom != ""){
            this.shipperCom = "%"+shipperCom+"%";
        }else {
            this.shipperCom = shipperCom;
        }
    }

    public void setConsiCom(String consiCom) {
        if(consiCom != null && consiCom != ""){
            this.consiCom = "%"+consiCom+"%";
        }else {
            this.consiCom = consiCom;
        }
    }

    public void setConsiTelephone(String consiTelephone) {
        if(consiTelephone != null && consiTelephone != ""){
            this.consiTelephone = "%"+consiTelephone+"%";
        }else {
            this.consiTelephone = consiTelephone;
        }
    }


}